'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    
    const { ctx } = this;
    //var result = await ctx.model.Articles.find()
    var {total,goods,msg} = await ctx.service.goods.find(ctx.query);
    // console.log(data);
    ctx.body ={
      msg,
      code:200,
      res:goods,
      total
    }
  }
}

module.exports = HomeController;
